<?PHP
if (!defined('PATH')) exit();
echo "
<style>

#bg {background-image:url('".PATH."/system/injections/".$INJECTION_PATH."/images/bg.gif');border:1px solid #000;width:110px;height:155px;padding:1px;}
#bg2 {background-image:url('".PATH."/system/injections/".$INJECTION_PATH."/images/bg.gif');border:1px solid #000000;width:260px;height:155px;padding:1px;}
#bg3 {background-image:url('".PATH."/system/injections/".$INJECTION_PATH."/images/bg.gif');border:1px solid #000000;width:160px;height:155px;padding:1px;}
#bg .col1 {float:left;margin-left:2px;}
#bg .col2 {float:left;margin-left:2px;}
#bg .col3 {float:left;margin-left:2px;}

.a2,.a0-2 {margin-top:15px;}
.a6,.a0-6 {margin-top:5px;}
.a9,.a0-9 {margin-top:5px;margin-bottom:15px;}

.a1,.a4,.a7,.a8,.a0-1,.a0-4,.a0-7,.a0-8 {margin-top:1.5px;}

.a3,.a0-3 {margin-top:15px;}
.a5,.a0-5 {margin-top:5px;}
.a10,.a0-10 {margin-bottom:15px;margin-top:5px;}

.a0,.a1,.a2,.a3,.a4,.a5,.a6,.a7,.a8,.a9,.a10 {width:34px;height:34px;}
.a0-1,.a0-2,.a0-3,.a0-4,.a0-5,.a0-6,.a0-7,.a0-8,.a0-9,.a0-10 {width:34px;height:34px;background-image:url('".PATH."/system/injections/".$INJECTION_PATH."/images/0.gif');}
/*img {position:relative;left:1px;top:1px;}*/
.a2 {background-image:url('".PATH."/system/injections/".$INJECTION_PATH."/images/2.gif');}
.a6 {background-image:url('".PATH."/system/injections/".$INJECTION_PATH."/images/6.gif');}
.a9 {background-image:url('".PATH."/system/injections/".$INJECTION_PATH."/images/9.gif');}

.a1 {background-image:url('".PATH."/system/injections/".$INJECTION_PATH."/images/1.gif');}
.a4 {background-image:url('".PATH."/system/injections/".$INJECTION_PATH."/images/4.gif');}
.a7 {background-image:url('".PATH."/system/injections/".$INJECTION_PATH."/images/7.gif');}
.a8 {background-image:url('".PATH."/system/injections/".$INJECTION_PATH."/images/8.gif');}

.a3 {background-image:url('".PATH."/system/injections/".$INJECTION_PATH."/images/3.gif');}
.a5 {background-image:url('".PATH."/system/injections/".$INJECTION_PATH."/images/5.gif');}
.a10 {background-image:url('".PATH."/system/injections/".$INJECTION_PATH."/images/10.gif');}

.soul {background-image:url('".PATH."/system/injections/".$INJECTION_PATH."/images/soul.png');margin-top:-14px;z-index:99999;height:25px;margin-left:-2px;;}
.cap {background-image:url('".PATH."/system/injections/".$INJECTION_PATH."/images/cap.png');margin-top:-14px;z-index:99999;height:25px;margin-left:-2px;;}
.cap .txtc {color: #CCCCCC;font-size:8px;font-weight:bold;  
  padding-left: 9px;
  padding-top: 11px;
  padding-right: 9px;
  padding-bottom: 2px;}
 .soul .txts {color: #CCCCCC;font-size:8px;font-weight:bold;  
  padding-left: 9px;
  padding-top: 11px;
  padding-right: 9px;
  padding-bottom: 2px;}
 .Health .h  {color: #CCCCCC;font-size:9px;font-weight:bold;  }
 .B-text {margin-top:6px;}
 .B-text .e  {color: #CCCCCC;font-size:9px;font-weight:bold;  }
  .B-text .ev {color: #CCCCCC;font-size:9px;font-weight:bold; text-align:right; margin-top:-16px; padding-bottom: 2px; }
  .B-text1 {margin-top:1px;}
 .B-text1 .e  {color: #CCCCCC;font-size:9px;font-weight:bold;  }
  .B-text1 .ev {color: #CCCCCC;font-size:9px;font-weight:bold; text-align:right; margin-top:-16px; padding-bottom: 2px; }
 .Health .hv {color: #CCCCCC;font-size:9px;font-weight:bold; text-align:right; margin-top:-21px; padding-bottom: 2px; }
 .Mana .m  {color: #CCCCCC;font-size:9px;font-weight:bold;  }
 .Mana .mv {color: #CCCCCC;font-size:9px;font-weight:bold; text-align:right; margin-top:-21px; padding-bottom: 2px; }
 .Exp .e  {color: #CCCCCC;font-size:9px;font-weight:bold;  }
 .Exp .ev {color: #CCCCCC;font-size:9px;font-weight:bold; text-align:right; margin-top:-21px; padding-bottom: 2px; }
</style> <br />";
/// Query + functions ///
$query = $SQL->query('SELECT * FROM `player_items` WHERE player_id = ' . $player->getId() . ' AND `pid` <= 10');

if ($query) {
	$item = array();
	foreach ($query as $result) {
		$item[$result['pid']]['img'] = "<img src='" . PATH . "/media/images/items/{$result['itemtype']}.gif' alt='{$result['itemtype']}' />";
		$item[$result['pid']]['id'] = $result['itemtype'];
		$class[$result['pid']] = "a0-" . $result['pid'];
	}
	for ($i = 1; $i <= 10; $i++) {
		if (isset($item[$i])) {
			$num_attr = 0;
			unset($val);
			$val = array();
			foreach ($val as $attribute) {
				if (!empty($attribute)
					)$num_attr++;
			}
			
		}
		if (empty($item[$i])) {
			$class[$i] = "a" . $i;
			
		}
}
}

/// End of Query And Functions ///
/// Values ///
$hp = ($player->getHealth() / $player->getHealthMax() * 100);
$mana = ($player->getMana() / $player->getMana() * 100);
/// Values ///
/// Stylizing ///
/// You can change
/// Each color of
/// The bar; you might
/// Use english forms
/// Or Css colors #FFFFFF
/// Stylizing ///
$skillwidth = (100);
$expcolor = "green";
$skillcolor1 = "orange";
$skillcolor2 = "orange";
$skillcolor3 = "orange";
$skillcolor4 = "orange";
$skillcolor5 = "orange";
$skillcolor6 = "orange";
$skillcolor7 = "orange";
$barwidth = 90;

$config['characters']['bar'] = 1;
$config['characters']['skills'] = 1;
?>
</br>

<!-- Equipment Shower Part -->
<table cellspacing="1" cellpadding="8" border="0" width="100%">
<tbody><tr class="head"><td colspan="2"><b>Character Specification</b></td></tr>
<tr>
<td align="center">
<div id="bg">
    <div class="col1">
        <div class="<?=$class['2'];?>" >
            <?=@$item['2']['img'];  ?>
        </div>
        <div class="<?=$class['6'];?>" >
            <?=@$item['6']['img'];?>
        </div>
        <div class="<?=$class['9'];?>" >
            <?=@$item['9']['img'];?>
        </div>
        <div class="soul"><div class="txts"><?=$player->getSoul();?></div></div>
    </div>
    <div class="col2">
        <div class="<?=$class['1'];?>" >
            <?=@$item['1']['img'];?>
        </div>
        <div class="<?=$class['4'];?>" >
            <?=@$item['4']['img'];?>
        </div>
        <div class="<?=$class['7'];?>" >
            <?=@$item['7']['img'];?>
        </div>
        <div class="<?=$class['8'];?>">
            <?=@$item['8']['img'];?>
        </div>
    </div>
    <div class="col3">
        <div class="<?=$class['3'];?>" >
            <?=@$item['3']['img'];?>
        </div>
        <div class="<?=$class['5'];?>" >
            <?=@$item['5']['img'];?>
        </div>
        <div class="<?=$class['10'];?>">
            <?=@$item['10']['img'];?>
        </div>
            <div class="cap"><div class="txtc"><?=$player->getCap();?></div></div>
    </div>
</div>
</td> 
</td>
</tr>
</table>
<table cellspacing="1" cellpadding="8" border="0" width="100%">
		<tr>
			<td>Health:</td>
			<td><center><?=$player->getHealth();?></center><div style="<?=$barwidth;?>; height: 3px; border: 1px solid #000;"><div style="background: red; width: <?=$hp;?>; height: 3px;"></div></td>
		</tr>
		<tr>	
			<td>Mana: </td>
			<td><center><?=$player->getMana();?></center><div style="<?=$barwidth;?>; height: 3px; border: 1px solid #000;"><div style="background: blue; width: <?=$mana;?>; height: 3px;"></div></td>	
		</tr>
		<tr>
			<td>Experience:</td>
			<td><center><?=$player->getExperience();?></center><div style="<?=$barwidth;?>; height: 3px; border: 1px solid #000;"><div style="background: <?=$expcolor;?>; width: <?=$skillwidth;?>; height: 3px;"></div></td>						
		</tr>
		<tr>
			<td>Level: </td><td><center><?=$player->getLevel();?></center></td>
		</tr>
		<tr>
			<td>Magic Level:</td><td><center><?=$player->getMagLevel();?></center></td>
		</tr>
</table>
 <!-- main talbe -->
 <br>
 <!-- Skill table -->
 <table cellspacing="1" cellpadding="8" border="0" width="100%">
<tr><td colspan="2">	
<strong>Fist</strong>: <div style="<?=$barwidth;?>%; height: 3px; border: 1px solid #000;"><div style="background: <?=$skillcolor1;?>; width: <?=$skillwidth;?>; height: 3px;"> </div></div><?=$player->getSkill(0);?></div>			
<strong>Club</strong>: <div style="<?=$barwidth;?>%; height: 3px; border: 1px solid #000;"><div style="background: <?=$skillcolor2;?>; width: <?=$skillwidth;?>; height: 3px;"> </div></div><?=$player->getSkill(1);?></div>
<strong>Sword</strong>: <div style="<?=$barwidth;?>%; height: 3px; border: 1px solid #000;"><div style="background: <?=$skillcolor3;?>; width: <?=$skillwidth;?>; height: 3px;"> </div></div><?=$player->getSkill(2);?></div>
<strong>Axe</strong>: <div style="<?=$barwidth;?>%; height: 3px; border: 1px solid #000;"><div style="background: <?=$skillcolor4;?>; width: <?=$skillwidth;?>; height: 3px;"> </div></div><?=$player->getSkill(3);?></div>
<strong>Dist</strong>: <div style="<?=$barwidth;?>%; height: 3px; border: 1px solid #000;"><div style="background: <?=$skillcolor5;?>; width: <?=$skillwidth;?>; height: 3px;"> </div></div><?=$player->getSkill(4);?></div>
<strong>Shielding</strong>: <div style="<?=$barwidth;?>%; height: 3px; border: 1px solid #000;"><div style="background: <?=$skillcolor6;?>; width: <?=$skillwidth;?>; height: 3px;"> </div></div><?=$player->getSkill(5);?></div>
<strong>Fishishing</strong>: <div style="<?=$barwidth;?>%; height: 3px; border: 1px solid #000;"><div style="background: <?=$skillcolor7;?>; width: <?=$skillwidth;?>; height: 3px;"> </div></div><?=$player->getSkill(6);?></div>

</td>
</tr>
</table>